const App = {
    // mixins: [Query],//配置文件，路径/utils/mixins.js
    data() {
        return {
            Data: [],
            isType:'0'
        }
    },
    mounted() {
        let ls_URL = window.location.href;
        let Land_SerialNumber = getQueryObject(ls_URL, "Land_SerialNumber");// 获取 nodeKey 参数
        this.isType = getQueryObject(ls_URL, "type") ? getQueryObject(ls_URL, "type") : '0';// 获取 nodeKey 参数
        this.handleShow(Land_SerialNumber);
    },
    methods: {
        handleShow(Land_SerialNumber) {
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryBySQLSerialNumber`,
                method: "post",
                data: {
                    SQLSerialNumber: (this.isType=='0'?'t_land_crop_record':this.isType=='1'?'t_land_crop_record1':this.isType=='2'?'t_land_crop_record2':''),
                    Condition: window.btoa(unescape(encodeURIComponent("%%,%%,%%"))),
                    ExtensionCondition:window.btoa(unescape(encodeURIComponent("AND land_crop_record.Land_SerialNumber = '"+Land_SerialNumber+"'")))
                },
                success: (res) => {
                    this.Data = res;
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
            });
        },
        xinwen() {
            window.location.href = '../../news_videos_files/news/add.html?action=Add'
        },
        goBack() {
            window.history.back();
        },
    },
};

const { createApp } = Vue;
const app = createApp(App);
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
const ElMessage = ElementPlus.ElMessage;
app.use(ElementPlus, { locale: zhCn });
app.mount("#app");
